blob: be6500ec76a3c3da46998de3524fcdd1424f1ef1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
---
export async function getStaticPaths() {
// get english pages that moved from `/` to `/en/`
const englishPages = Astro.fetchContent('./en/**/*.md');
// add pages that are `*.astro` files as well
const otherPages = [{ url: '/en/themes' }];
return [...englishPages, ...otherPages].map((page) => ({
params: {
slug: page.url.slice(4),
},
props: {
englishSlug: page.url,
},
}));
}
---
<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
|